package br.com.seuimovelnamao;

import java.util.Enumeration;
import java.util.Properties;
import java.util.ResourceBundle;

public class PropertiesLoader {

	private Properties props;
	private String nomeDoProperties = "messages";

	protected PropertiesLoader() {
		props = new Properties();  
		ResourceBundle bundle = ResourceBundle.getBundle (nomeDoProperties, new UTF8Control());  
		Enumeration e = bundle.getKeys ();  
		while (e.hasMoreElements ()) {  
		      String key = (String)e.nextElement ();  
		      String value = bundle.getString (key);  
		      props.put (key, value);  
		}  
			
	}

	protected String getValor(String chave) {
		return (String) props.getProperty(chave);
	}

}
